package com.sky.service;

import com.sky.dto.*;
import com.sky.entity.Orders;
import com.sky.result.PageResult;
import com.sky.vo.OrderPaymentVO;
import com.sky.vo.OrderStatisticsVO;
import com.sky.vo.OrderSubmitVO;
import com.sky.vo.OrderVO;


public interface OrderService {

    //用户下单
    OrderSubmitVO submit(OrdersSubmitDTO ordersSubmitDTO);

    //分页条件查询历史订单
    PageResult list(OrdersPageQueryDTO ordersPageQueryDTO);

    //根据订单id查询订单详细
    OrderVO selOrderDetailByOrderId(Long id);

    //再来一单
    void oneMoreOrder(Long id);

    //取消订单
    void cancelOrder(Long id);

    /**
     * 订单支付
     * @param ordersPaymentDTO
     * @return
     */
    OrderPaymentVO payment(OrdersPaymentDTO ordersPaymentDTO) throws Exception;

    /**
     * 支付成功，修改订单状态
     * @param outTradeNo
     */
    void paySuccess(String outTradeNo);

    //管理员取消订单
    void adminCancelOrder(OrdersCancelDTO ordersCancelDTO);

    //订单搜索
    PageResult selAllOrders(OrdersPageQueryDTO ordersPageQueryDTO);

    //各个状态的订单数量统计
    OrderStatisticsVO selOrderStatistics();

    //接单
    void confirm(Long id);

    //拒单
    void rejection(OrdersRejectionDTO ordersRejectionDTO);

    //派送订单
    void delivery(Long id);

    //完成订单
    void complete(Long id);

    //用户催单
    void reminderOrder(Long id);
}
